﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ChangePass.ascx.cs" Inherits="Pages_ChangeProfile" %><%@ Register assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<style type="text/css">
    .style1
    {
        width: 100%;
    }
    .style2
    {
        width: 141px;
    }
    .style3
    {
        width: 85px;
    }
    .style4
    {
        width: 76px;
    }
</style>

<asp:MultiView ID="muntiviChangePass" runat="server">
    <asp:View ID="vwChangePass1" runat="server">
        <table class="style1">
            <tr>
                <td class="style2">
                    <dx:ASPxLabel ID="ASPxLabel1" runat="server" 
                        CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
                        Text="Username:">
                    </dx:ASPxLabel>
                </td>
                <td>
                    <dx:ASPxTextBox ID="txtUser" runat="server" 
                        CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
                        ReadOnly="True" SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css" 
                        Width="170px">
                    </dx:ASPxTextBox>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    <dx:ASPxLabel ID="ASPxLabel2" runat="server" 
                        CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
                        Text="Old password:">
                    </dx:ASPxLabel>
                </td>
                <td>
                    <dx:ASPxTextBox ID="txtOldPass" runat="server" 
                        CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
                        Password="True" SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css" 
                        Width="170px">
                    </dx:ASPxTextBox>
                    <asp:CustomValidator ID="CustomValidator1" runat="server" 
                        ControlToValidate="txtOldPass" Display="Dynamic" 
                        ErrorMessage="Password is fale!" 
                        onservervalidate="CustomValidator1_ServerValidate" SetFocusOnError="True"></asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    <dx:ASPxLabel ID="ASPxLabel3" runat="server" 
                        CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
                        Text="New password:">
                    </dx:ASPxLabel>
                </td>
                <td>
                    <dx:ASPxTextBox ID="txtNewPass" runat="server" 
                        CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
                        Password="True" SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css" 
                        Width="170px">
                    </dx:ASPxTextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtNewPass" Display="Dynamic" 
                        ErrorMessage="New password is not blank!" SetFocusOnError="True"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="txtNewPass" Display="Dynamic" 
                        ErrorMessage="New password must be at least 6 to 30 characters!" 
                        SetFocusOnError="True" ValidationExpression="[1-9a-zA-Z]{6,30}"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    <dx:ASPxLabel ID="ASPxLabel4" runat="server" 
                        CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
                        Text="Comfirm new password:">
                    </dx:ASPxLabel>
                </td>
                <td>
                    <dx:ASPxTextBox ID="txtComfirmNewPass" runat="server" 
                        CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
                        Password="True" SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css" 
                        Width="170px">
                    </dx:ASPxTextBox>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" 
                        ControlToCompare="txtNewPass" ControlToValidate="txtComfirmNewPass" 
                        Display="Dynamic" ErrorMessage="Comfirm Password and Password does not match" 
                        SetFocusOnError="True"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td>
                    <table style="width: 100%;">
                        <tr>
                            <td class="style3">
                                <dx:ASPxButton ID="btChangePass" runat="server" 
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
                                    onclick="btChangePass_Click" 
                                    SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css" Text="Change">
                                </dx:ASPxButton>
                            </td>
                            <td>
                                <dx:ASPxButton ID="btResetChangePass" runat="server" CausesValidation="False" 
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
                                    onclick="btResetChangePass_Click" 
                                    SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css" Text="Reset">
                                </dx:ASPxButton>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </asp:View>
    <asp:View ID="vwChangePass3" runat="server">
        <dx:ASPxLabel ID="lbStatusChangePass0" runat="server" 
            CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
            Text="Password changed success!">
        </dx:ASPxLabel>
        <table style="width:100%;">
            <tr>
                <td class="style4">
                    <dx:ASPxButton ID="btYesChangePass" runat="server" CausesValidation="False" 
                        CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
                        onclick="btYesChangePass_Click" 
                        SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css" Text="Yes">
                    </dx:ASPxButton>

                    <dx:ASPxButton ID="btYesSuccessChangePass" runat="server" CausesValidation="False" 
                        CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
                        onclick="btYesSuccessChangePass_Click" 
                        SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css" Text="Yes" 
                        Visible="False">
                    </dx:ASPxButton>
                </td>
                <td>
                    <dx:ASPxButton ID="btNoChangPass" runat="server" CausesValidation="False" 
                        CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
                        onclick="btNoChangPass_Click" 
                        SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css" Text="No">
                    </dx:ASPxButton>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
    </asp:View>
    <asp:View ID="vwChangePass2" runat="server">
        <dx:ASPxLabel ID="lbStatusChangePass" runat="server" 
            CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
            Text="Bạn chưa đăng nhập! Vui lòng đăng nhập!">
        </dx:ASPxLabel>
        <dx:ASPxButton ID="btOkChangePass" runat="server" CausesValidation="False" 
            CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" 
            onclick="btOkChangePass_Click" 
            SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css" Text="  Ok   ">
        </dx:ASPxButton>
    </asp:View>
</asp:MultiView>

